import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/girls',
    name: 'girls',
    component: () => import('@/views/girl')
  },
  {
    path: '/ganhuo/:type',
    name: 'ganhuo',
    props: true,
    component: () => import('@/views/ganhuo')
  },
  {
    path: '/details/girl/:id',
    name: 'girl-details',
    props: true,
    component: () => import('@/views/details/girl')
  },
  {
    path: '/details/article/:id',
    name: 'article-details',
    props: true,
    component: () => import('@/views/details/article')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
